package com.yricky.indesk.utils

import me.yricky.event.Channel


/**
 * @author Yricky
 * @date 2021/12/28
 */
val cfgChannel: Channel<CfgEvent> = Channel.newInst()
fun postCfgEvent(event:CfgEvent){
    cfgChannel.post(event)
}
sealed class CfgEvent{
    object CfgChanged : CfgEvent()
    object DCfgChanged :CfgEvent()

}

val pkgChannel:Channel<PkgEvent> = Channel.newInst()
sealed class PkgEvent{
    class PkgInstalled(val pkgName:String):PkgEvent()
    class PkgUninstalled(val pkgName: String):PkgEvent()
}

val minuteTimerChannel:Channel<TimeEvent> = Channel.newInst()
object TimeEvent